<form action="{:sysuri()}" data-table-id="TagsData" class="layui-form layui-card" data-auto="true" method="post">
    <div class="layui-card-body padding-left-40">

        <label class="layui-form-item relative block">
            <span class="help-label"><b>优惠券名称</b>coupon_name</span>
            <input class="layui-input" name="coupon_name" placeholder="请输入优惠券名称" required value="{$vo.coupon_name|default=''}"/>
            <span class="help-block"><b>必填，</b>优惠券名称</span>
        </label>

        <label class="layui-form-item relative block">
            <span class="help-label"><b>满足多少钱</b>satisfy_money</span>
            <input class="layui-input" name="satisfy_money" type="number" placeholder="满足多少钱" required value="{$vo.satisfy_money|default='0'}"/>
            <span class="help-block"><b>必填，</b>满足多少钱</span>
        </label>

        <label class="layui-form-item relative block">
            <span class="help-label"><b>减少多少钱</b>reduce_money</span>
            <input class="layui-input" name="reduce_money" type="number" placeholder="减少多少钱" required value="{$vo.reduce_money|default='0'}"/>
            <span class="help-block"><b>必填，</b>减少多少钱</span>
        </label>

        <label class="layui-form-item relative block">
            <span class="help-label"><b>发行多少张</b>total_number</span>
            <input class="layui-input" name="total_number" type="number" placeholder="发行多少张" required value="{$vo.total_number|default='0'}"/>
            <span class="help-block"><b>必填，</b>发行多少张</span>
        </label>

        <label class="layui-form-item relative block">
            <span class="help-label"><b>剩余多少张</b>surplus_number</span>
            <input class="layui-input" name="surplus_number" type="number" placeholder="剩余多少张" required value="{$vo.surplus_number|default='0'}"/>
            <span class="help-block"><b>必填，</b>剩余多少张</span>
        </label>

        <label class="layui-form-item relative block">
            <span class="help-label"><b>每人最多领取几张</b>each_number</span>
            <input class="layui-input" name="each_number" type="number" placeholder="每人最多领取几张" required value="{$vo.each_number|default='0'}"/>
            <span class="help-block"><b>必填，</b>每人最多领取几张</span>
        </label>

        <label class="layui-form-item relative block">
            <span class="help-label"><b>到期时间</b>expire_time</span>
            <input class="layui-input" type="text" name="expire_time" required  value="{$vo.expire_time|default=''}" id="test1" />
            <span class="help-block"><b>必填，</b>到期时间</span>
        </label>


    </div>

    <div class="hr-line-dashed"></div>
    {notempty name='vo.id'}<input name='id' type='hidden' value='{$vo.id}'>{/notempty}

    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" data-close type='button' data-confirm="确定要取消修改吗？">取消编辑</button>
    </div>
</form>

<script>
    // layui.use('laydate', function(){
    //     var laydate = layui.laydate;
    //
    //     //执行一个laydate实例
    //     laydate.render({
    //         elem: '#test1' //指定元素
    //     });
    // })

    laydate.render({
        elem: '#test1', //绑定元素 根据input的id属性来绑定元素
        value: new Date(),
        'type':'datetime'
    });
</script>